//
//  UINavigationBar+theme.m
//  OC背景主题
//
//  Created by Hahn on 2018/11/1.
//  Copyright © 2018 今晚打老虎. All rights reserved.
//

#import "UINavigationBar+theme.h"
#import "theme.h"
#import "UIView+theme.h"

@implementation UINavigationBar (theme)

- (void)changeColor {
    
    [super changeColor];
    
    [self setBarTintColor:[theme shareTheme].color];
    [self setBackgroundColor:[UIColor clearColor]];
    [self setTitleTextAttributes:@{NSForegroundColorAttributeName: [theme shareTheme].color2}];
    
    // 改变电池栏Style
    if ([theme shareTheme].appColor == 0) {
        [self setBarStyle:UIBarStyleDefault];
    } else{
        [self setBarStyle:UIBarStyleBlackTranslucent];
    }
}


@end
